/*global QUnit, opaTest*/

sap.ui.define(
  [
    "demo/walkthrough/localService/mockserver",
    "sap/ui/test/opaQunit",
    "./pages/App",
  ],
  function (mockserver) {
    "use strict";

    QUnit.module("Navigation");

    opaTest("Should open the Hello dialog", function (Given, When, Then) {
      mockserver.init();

      // Arrangements
      Given.iStartMyUIComponent({
        componentConfig: {
          name: "demo.walkthrough",
        },
      });

      // Actions
      When.onTheAppPage.iPressTheSayHelloWithDialogButton();

      // Assertions
      Then.onTheAppPage.iShouldSeeTheHelloDialog();

      // Cleanup
      Then.iTeardownMyApp();
    });
  }
);
